#ifndef PARSE_H_INCLUDED
#define PARSE_H_INCLUDED

#include <string>
#include <vector>

/* A pointer to a function which will execute a keyword */
typedef void (*cmdPtr)(unsigned short int&, const std::vector<std::string>&, int&);

/* Instructions passed to the parser regarding how to handle subsequent instructions */
enum parserParam {DEFAULT_PARAM, FETCH_NEXT_LINE, FETCH_IF_BODY, FETCH_FOR_BODY};

/* Parse one line of code */
void parse(std::string& srcLine, int& nLine);

/* Keep check on whether the brackets are balanced */
extern short int bracketBalance;

/* A recursive descent parser - the bread and butter for most of the keywords */
double getExpr(unsigned short int& idx, const std::vector<std::string>& tokens, int& nLine);

#endif // PARSE_H_INCLUDED
